<template>
  <div class="divBox">
    <el-card class="box-card">
      <div slot="header" class="clearfix">

        <div class="container">
          <el-form inline size="small" :model="siteFrom" ref="siteFrom" :label-position="labelPosition"
                   label-width="100px">
            <el-row>
              <el-col :xs="24" :sm="24" :md="24" :lg="18" :xl="18">
                <el-col v-bind="grid">
                  <el-form-item label="站点搜索：">
                    <el-input v-model="siteFrom.keywords" placeholder="请输入" clearable class="selWidth"/>
                  </el-form-item>
                </el-col>
                <!--<el-col :span="24">-->
                <!--<el-col v-bind="grid">-->
                <!--<el-form-item label="会员搜索：">-->
                <!--<el-input v-model="siteFrom.keywords" placeholder="请输入" clearable  class="selWidth"/>-->
                <!--</el-form-item>-->
                <!--</el-col>-->
                <!--</el-col>-->
              </el-col>
              <template v-if="collapse">

                <el-col :xs="24" :sm="24" :md="24" :lg="18" :xl="18">
                  <el-col v-bind="grid">
                    <el-form-item label="站点类型：">
                      <el-radio-group v-model="siteFrom.type" type="button" class="selWidth">
                        <el-radio-button label="1">
                          <span>供热</span>
                        </el-radio-button>
                        <el-radio-button label="2">
                          <span>需热</span>
                        </el-radio-button>
                      </el-radio-group>
                    </el-form-item>
                  </el-col>
                </el-col>

              </template>
              <el-col :xs="24" :sm="24" :md="24" :lg="6" :xl="6" class="text-right siteFrom">
                <el-form-item>
                  <el-button type="primary" icon="ios-search" label="default" class="mr15" size="small"
                             @click="editUser(0)">新增
                  </el-button>
                  <el-button type="primary" icon="ios-search" label="default" class="mr15" size="small"
                             @click="userSearchs">搜索
                  </el-button>
                  <el-button class="ResetSearch mr10" @click="reset('siteFrom')" size="small">重置</el-button>
                  <a class="ivu-ml-8" @click="collapse = !collapse">
                    <template v-if="!collapse">
                      展开 <i class="el-icon-arrow-down"></i>
                    </template>
                    <template v-else>
                      收起 <i class="el-icon-arrow-up"></i>
                    </template>
                  </a>
                </el-form-item>
              </el-col>
            </el-row>
          </el-form>
        </div>
      </div>
      <el-table
        ref="table"
        v-loading="listLoading"
        :data="tableData.data"
        style="width: 100%"
        size="mini"
        @selection-change="onSelectTab"
        highlight-current-row
      >

        <el-table-column
          prop="id"
          label="ID"
          min-width="80"
        />
        <el-table-column label="封面" min-width="80">
          <template slot-scope="scope">
            <div class="demo-image__preview">
              <el-image
                style="width: 36px; height: 36px"
                :src="scope.row.cover"
                :preview-src-list="[scope.row.cover]"
              />
            </div>
          </template>
        </el-table-column>
        <el-table-column
          label="名称"
          min-width="130"
        >
          <template slot-scope="scope">
            <span>{{scope.row.name | filterEmpty  }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="所属用户"
          min-width="130"
        >
          <template slot-scope="scope">
            <span>{{scope.row.real_name | filterEmpty  }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="地址"
          min-width="100"
        >
          <template slot-scope="scope">
            <span>{{scope.row.address}}</span>
          </template>
        </el-table-column>

        <el-table-column
          label="站点类型"
          min-width="100"
        >
          <template slot-scope="scope">
            <span>{{scope.row.type =='1' ? '供热' : '需热' }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="阈值(℃)"
          min-width="100"
        >
          <template slot-scope="scope">
            <span>{{scope.row.threshold}}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="热能容量(kj)"
          min-width="100"
        >
          <template slot-scope="scope">
            <span>{{scope.row.total}}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="管道数量"
          min-width="100"
        >
          <template slot-scope="scope">
            <span>{{scope.row.channel}}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="水箱大小(m³)"
          min-width="100"
        >
          <template slot-scope="scope">
            <span>{{scope.row.box}}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="效率（GJ/h）"
          min-width="100"
        >
          <template slot-scope="scope">
            <span>{{scope.row.efficiency}}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="状态"
          min-width="100"
        >
          <template slot-scope="scope">
            <span>{{scope.row.status == '1' ? '正常' : '需要服务'}}</span>
          </template>
        </el-table-column>

        <el-table-column label="操作" min-width="130" fixed="right" align="center">
          <template slot-scope="scope">
            <el-button type="text" @click="editUser(scope.row.id)" size="small">编辑</el-button>
          </template>
        </el-table-column>
      </el-table>
      <div class="block">
        <el-pagination
          :page-sizes="[15, 30, 45, 60]"
          :page-size="siteFrom.limit"
          :current-page="siteFrom.page"
          layout="total, sizes, prev, pager, next, jumper"
          :total="tableData.total"
          @size-change="handleSizeChange"
          @current-change="pageChange"
        />
      </div>
    </el-card>
    <!--修改推广人-->
    <el-dialog
      title="修改推广人"
      :visible.sync="extensionVisible"
      width="500px"
      :before-close="handleCloseExtension">
      <el-form class="formExtension mt20" ref="formExtension" :model="formExtension" :rules="ruleInline"
               label-width="120px"
               @submit.native.prevent v-loading="loading">
        <el-form-item label="用户头像：" prop="image">
          <div class="upLoadPicBox" @click="modalPicTap">
            <div v-if="formExtension.image" class="pictrue"><img :src="formExtension.image"></div>
            <div v-else class="upLoad">
              <i class="el-icon-camera cameraIconfont"/>
            </div>
          </div>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
          <el-button type="primary" @click="onSubExtension('formExtension')">确 定</el-button>
      </span>
    </el-dialog>
    <!--用户列表-->
    <el-dialog
      title="用户列表"
      :visible.sync="userVisible"
      width="900px">
      <user-list v-if="userVisible" @getTemplateRow="getTemplateRow"></user-list>
      <span slot="footer" class="dialog-footer">
        <el-button @click="userVisible = false">取 消</el-button>
        <el-button type="primary" @click="userVisible = false">确 定</el-button>
      </span>
    </el-dialog>
    <!--批量设置-->
    <el-dialog
      title="设置"
      :visible.sync="dialogVisible"
      width="500px"
      :before-close="handleClose">
      <el-form :model="dynamicValidateForm" ref="dynamicValidateForm" label-width="100px" class="demo-dynamic"
               v-loading="loading">
        <el-form-item
          prop="groupId"
          label="用户分组"
          :rules="[{ required: true, message: '请选择用户分组', trigger: 'change' }]"
          v-if="batchName ==='group'"
          key="1"
        >
          <el-select v-model="dynamicValidateForm.groupId" placeholder="请选择分组" style="width: 80%" filterable>
            <el-option :value="item.id" v-for="(item, index) in groupList" :key="index"
                       :label="item.groupName"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item
          prop="groupId"
          label="用户标签"
          :rules="[{ required: true, message: '请选择用户标签', trigger: 'change' }]"
          v-else
        >
          <el-select v-model="dynamicValidateForm.groupId" placeholder="请选择标签" style="width: 80%" filterable multiple>
            <el-option :value="item.id" v-for="(item, index) in labelLists" :key="index" :label="item.name"></el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="handleClose">取 消</el-button>
        <el-button type="primary" @click="submitForm('dynamicValidateForm')">确 定</el-button>
      </span>
    </el-dialog>
    <!--编辑-->
    <el-dialog
      :title="addOrEdit"
      :visible.sync="visible"
      width="1000px"
    >
      <edit-from v-if="visible" :uid="uid" @resetForm="resetForm"></edit-from>
    </el-dialog>
    <!--积分余额-->
    <el-dialog
      title="积分余额"
      :visible.sync="VisiblePoint"
      width="500px"
      :close-on-click-modal="false"
      :before-close="handlePointClose">
      <el-form :model="PointValidateForm" ref="PointValidateForm" label-width="100px" class="demo-dynamic"
               v-loading="loadingPoint">
        <el-form-item
          label="修改余额"
          required
        >
          <el-radio-group v-model="PointValidateForm.moneyType">
            <el-radio :label="1">增加</el-radio>
            <el-radio :label="2">减少</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item
          label="余额"
          required
        >
          <el-input-number type="text" v-model="PointValidateForm.moneyValue" :max="999999"></el-input-number>
        </el-form-item>
        <el-form-item
          label="修改积分"
          required
        >
          <el-radio-group v-model="PointValidateForm.integralType">
            <el-radio :label="1">增加</el-radio>
            <el-radio :label="2">减少</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item
          label="积分"
          required
        >
          <el-input-number type="text" step-strictly v-model="PointValidateForm.integralValue"
                           :max="999999"></el-input-number>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="handlePointClose">取 消</el-button>
        <el-button type="primary" :loading="loadingBtn" @click="submitPointForm('PointValidateForm')">确 定</el-button>
      </span>
    </el-dialog>
    <!--账户详情-->
    <el-dialog
      title="用户详情"
      :visible.sync="Visible"
      width="1100px"
      v-if="uid"
      :before-close="Close">
      <user-details ref="userDetails" :uid="uid" v-if="Visible"></user-details>
    </el-dialog>
  </div>
</template>

<script>
  import {
    groupListApi,
    levelListApi,
    tagListApi,
    groupPiApi,
    tagPiApi,
    foundsApi,
    updateSpreadApi,
    useSiteListApi
  } from '@/api/user'
  import {spreadClearApi} from '@/api/distribution'
  import editFrom from './edit'
  import userDetails from './userDetails'
  import userList from '@/components/userList'
  import * as logistics from '@/api/logistics.js'
  import Cookies from 'js-cookie'

  export default {
    name: 'UserIndex',
    components: {editFrom, userDetails, userList},
    filters: {
      sexFilter(status) {
        const statusMap = {
          0: '未知',
          1: '男',
          2: '女',
          3: '保密'
        }
        return statusMap[status]
      }
    },
    data() {
      return {
        formExtension: {
          image: '',
          spreadUid: '',
          userId: ''
        },
        ruleInline: {},
        extensionVisible: false,
        userVisible: false,
        pickerOptions: {
          shortcuts: [
            {
              text: '今天',
              onClick(picker) {
                const end = new Date()
                const start = new Date()
                start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate()))
                picker.$emit('pick', [start, end])
              }
            },
            {
              text: '昨天',
              onClick(picker) {
                const end = new Date()
                const start = new Date()
                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 1)))
                end.setTime(end.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate())))
                picker.$emit('pick', [start, end])
              }
            },
            {
              text: '最近7天',
              onClick(picker) {
                const end = new Date()
                const start = new Date()
                start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
                picker.$emit('pick', [start, end])
              }
            },
            {
              text: '最近30天',
              onClick(picker) {
                const end = new Date()
                const start = new Date()
                start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
                picker.$emit('pick', [start, end])
              }
            },
            {
              text: '本月',
              onClick(picker) {
                const end = new Date()
                const start = new Date()
                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), 1)))
                picker.$emit('pick', [start, end])
              }
            },
            {
              text: '本年',
              onClick(picker) {
                const end = new Date()
                const start = new Date()
                start.setTime(start.setTime(new Date(new Date().getFullYear(), 0, 1)))
                picker.$emit('pick', [start, end])
              }
            }
          ]
        },
        loadingBtn: false,
        PointValidateForm: {
          integralType: 2,
          integralValue: 0,
          moneyType: 2,
          moneyValue: 0,
          uid: ''
        },
        loadingPoint: false,
        VisiblePoint: false,
        visible: false,
        addOrEdit: '编辑',
        userIds: '',
        dialogVisible: false,
        levelData: [],
        groupData: [],
        labelData: [],
        selData: [],
        labelPosition: 'right',
        collapse: true,
        props: {
          children: 'child',
          label: 'name',
          value: 'name',
          emitPath: false
        },
        propsCity: {
          children: 'child',
          label: 'name',
          value: 'name'
        },
        headeNum: [
          {'type': '', 'name': '全部用户'},
          {'type': 'wechat', 'name': '微信公众号用户'},
          {'type': 'routine', 'name': '微信小程序用户'},
          {'type': 'h5', 'name': 'H5用户'}
        ],
        listLoading: true,
        tableData: {
          data: [],
          total: 0
        },
        loginType: '',
        siteFrom: {
          id: '',
          type: '',
          name: '',
          address: '',
          lat: '',
          lng: '',
          threshold: 0,
          total: '',
          info: '',
          cover: '',
          uid: '',
          status: '',
          channel: 1,
          box: 0,
          target: '',
          classify: '',
          efficiency: 1,
          real_name:''
        },
        grid: {
          xl: 8,
          lg: 12,
          md: 12,
          sm: 24,
          xs: 24
        },
        grid2: {
          xl: 18,
          lg: 16,
          md: 12,
          sm: 24,
          xs: 24
        },
        grid3: {
          xl: 8,
          lg: 12,
          md: 12,
          sm: 24,
          xs: 24
        },
        levelList: [],
        labelLists: [],
        groupList: [],
        selectedData: [],
        timeVal: [],
        addresData: [],
        dynamicValidateForm: {
          groupId: []
        },
        loading: false,
        groupIdFrom: [],
        selectionList: [],
        batchName: '',
        uid: 0,
        Visible: false,
        keyNum: 0,
        address: [],
        multipleSelectionAll: [],
        idKey: 'uid',
        userId:this.$route.query.uid > 0 ? this.$route.query.uid : 0
      }
    },
    mounted() {
      this.getList()
      this.groupLists()
      this.levelLists()
      this.getTagList()
      this.getCityList()
    },
    methods: {
      // 清除
      clearSpread(row) {
        this.$modalSure('解除【' + row.nickname + '】的上级推广人吗').then(() => {
          spreadClearApi(row.uid).then((res) => {
            this.$message.success('清除成功')
            this.getList()
          })
        })
      },
      onSubExtension(formName) {
        this.$refs[formName].validate((valid) => {
          if (valid) {
            updateSpreadApi(this.formExtension).then(res => {
              this.$message.success('设置成功')
              this.extensionVisible = false
              this.getList()
            })
          } else {
            return false;
          }
        });
      },
      getTemplateRow(row) {
        this.formExtension.image = row.avatar
        this.formExtension.spreadUid = row.uid
      },
      setExtension(row) {
        this.formExtension = {
          image: '',
          spreadUid: '',
          userId: row.uid
        };
        this.extensionVisible = true
      },
      handleCloseExtension() {
        this.extensionVisible = false
      },
      modalPicTap() {
        this.userVisible = true
      },
      resetForm() {
        this.visible = false;
      },
      reset(formName) {
        this.siteFrom = {
          id: '',
          type: '',
          name: '',
          address: '',
          lat: '',
          lng: '',
          threshold: 0,
          total: '',
          info: '',
          cover: '',
          uid: '',
          status: '',
          channel: 1,
          box: 0,
          target: '',
          classify: '',
          efficiency: 1,
          real_name:'-',
        }
        this.levelData = []
        this.groupData = []
        this.labelData = []
        this.timeVal = []
        this.getList()
      },
      // 列表
      getCityList() {
        logistics.cityListTree().then(res => {
          res.forEach((el, index) => {
            el.child.forEach((cel, j) => {
              delete cel.child
            })
          })
          this.addresData = res
        })

      },
      // 发送文章
      sendNews() {
        if (this.selectionList.length === 0) return this.$message.warning('请先选择用户')
        const _this = this
        this.$modalArticle(function (row) {
        }, 'send')
      },
      Close() {
        this.Visible = false
      },
      // 账户详情
      onDetails(id) {
        this.uid = id
        this.Visible = true
      },
      // 积分余额
      editPoint(id) {
        this.uid = id
        this.VisiblePoint = true
      },
      // 积分余额
      submitPointForm(formName) {
        this.$refs[formName].validate((valid) => {
          if (valid) {
            this.PointValidateForm.uid = this.uid
            this.loadingBtn = true
            foundsApi(this.PointValidateForm).then(res => {
              this.$message.success('设置成功')
              this.loadingBtn = false
              this.handlePointClose()
              this.getList()
            }).catch(() => {
              this.loadingBtn = false
            })
          } else {
            return false
          }
        })
      },
      // 积分余额
      handlePointClose() {
        this.VisiblePoint = false
        this.PointValidateForm = {
          integralType: 2,
          integralValue: 0,
          moneyType: 2,
          moneyValue: 0,
          uid: ''
        }
      },
      editUser(id) {
        if (id) {
          this.uid = id
        } else {
          this.uid = 0
          this.addOrEdit = '新增'
        }
        this.visible = true
      },
      submitForm(formName) {
        // let data = [];
        // if(!this.userIds){
        //   if(this.multipleSelectionAll.length){
        //     this.multipleSelectionAll.map((item) => {
        //       data.push(item.uid)
        //     });
        //     this.userIds = data.join(',');
        //   }
        // }
        this.$refs[formName].validate((valid) => {
          if (valid) {
            this.loading = true
            this.batchName === 'group' ? groupPiApi({
              groupId: this.dynamicValidateForm.groupId,
              id: this.userIds
            }).then(res => {
              this.$message.success('设置成功')
              this.loading = false
              this.handleClose()
              this.getList()
            }).catch(() => {
              this.loading = false
            }) : tagPiApi({tagId: this.dynamicValidateForm.groupId.join(','), id: this.userIds}).then(res => {
              this.$message.success('设置成功')
              this.loading = false
              this.handleClose()
              this.getList()
            }).catch(() => {
              this.loading = false
            })
          } else {
            return false;
          }
        });
      },
      handleClose() {
        this.dialogVisible = false
        this.$refs['dynamicValidateForm'].resetFields();
      },
      // 全选
      onSelectTab(selection) {
        this.selectionList = selection;
        setTimeout(() => {
          this.changePageCoreRecordData()
          let data = [];
          if (this.multipleSelectionAll.length) {
            this.multipleSelectionAll.map((item) => {
              data.push(item.uid)
            });
            this.userIds = data.join(',');
          }
        }, 50)
      },
      // 搜索
      userSearchs() {
        this.siteFrom.page = 1;
        this.getList();
      },
      // 选择国家
      changeCountry() {
        if (this.siteFrom.country === 'OTHER' || !this.siteFrom.country) {
          this.selectedData = [];
          this.siteFrom.province = '';
          this.siteFrom.city = '';
          this.address = [];
        }
      },
      // 选择地址
      handleChange(value) {
        this.siteFrom.province = value[0];
        this.siteFrom.city = value[1];
      },
      // 具体日期
      onchangeTime(e) {
        this.timeVal = e;
        this.siteFrom.dateLimit = e ? this.timeVal.join(',') : '';
      },
      // 分组列表
      groupLists() {
        groupListApi({page: 1, limit: 9999}).then(async res => {
          this.groupList = res.list
        })
      },
      //标签列表
      getTagList() {
        tagListApi({page: 1, limit: 9999}).then(res => {
          this.labelLists = res.list
        })
      },
      // 等级列表
      levelLists() {
        levelListApi({page: 1, limit: 9999}).then(async res => {
          this.levelList = res.list
          localStorage.setItem('levelKey', JSON.stringify(res.list))
        })
      },
      // 列表
      getList() {
        this.listLoading = true
        let dataParam = {};
        if(this.userId>0){
          this.siteFrom.uid = this.userId

        }
        useSiteListApi(this.siteFrom).then(res => {

          console.log(res);
          this.tableData.data = res
          this.tableData.total = res.length
          this.listLoading = false

        }).catch((e) => {
          console.log(e)
        })
      },
      // 设置选中的方法
      setSelectRow() {
        if (!this.multipleSelectionAll || this.multipleSelectionAll.length <= 0) {
          return
        }
        // 标识当前行的唯一键的名称
        const idKey = this.idKey
        const selectAllIds = []
        this.multipleSelectionAll.forEach(row => {
          selectAllIds.push(row[idKey])
        })
        this.$refs.table.clearSelection()
        for (var i = 0; i < this.tableData.data.length; i++) {
          if (selectAllIds.indexOf(this.tableData.data[i][idKey]) >= 0) {
            // 设置选中，记住table组件需要使用ref="table"
            this.$refs.table.toggleRowSelection(this.tableData.data[i], true)
          }
        }
      },
      // 记忆选择核心方法
      changePageCoreRecordData() {
        // 标识当前行的唯一键的名称
        const idKey = this.idKey
        const that = this
        // 如果总记忆中还没有选择的数据，那么就直接取当前页选中的数据，不需要后面一系列计算
        if (this.multipleSelectionAll.length <= 0) {
          this.multipleSelectionAll = this.selectionList
          return
        }
        // 总选择里面的key集合
        const selectAllIds = []
        this.multipleSelectionAll.forEach(row => {
          selectAllIds.push(row[idKey])
        })
        const selectIds = []
        // 获取当前页选中的id
        this.selectionList.forEach(row => {
          selectIds.push(row[idKey])
          // 如果总选择里面不包含当前页选中的数据，那么就加入到总选择集合里
          if (selectAllIds.indexOf(row[idKey]) < 0) {
            that.multipleSelectionAll.push(row)
          }
        })
        const noSelectIds = []
        // 得到当前页没有选中的id
        this.tableData.data.forEach(row => {
          if (selectIds.indexOf(row[idKey]) < 0) {
            noSelectIds.push(row[idKey])
          }
        })
        noSelectIds.forEach(uid => {
          if (selectAllIds.indexOf(uid) >= 0) {
            for (let i = 0; i < that.multipleSelectionAll.length; i++) {
              if (that.multipleSelectionAll[i][idKey] == uid) {
                // 如果总选择中有未被选中的，那么就删除这条
                that.multipleSelectionAll.splice(i, 1)
                break
              }
            }
          }
        })
      },
      pageChange(page) {
        this.changePageCoreRecordData()
        this.siteFrom.page = page
        this.getList()
      },
      handleSizeChange(val) {
        this.changePageCoreRecordData()
        this.siteFrom.limit = val
        this.getList()
      },
      // 删除
      handleDelete(id, idx) {
        this.$modalSure().then(() => {
          productDeleteApi(id).then(() => {
            this.$message.success('删除成功')
            this.getList()
          })
        })
      },
      onchangeIsShow(row) {
        row.isShow
          ? putOnShellApi(row.id).then(() => {
            this.$message.success('上架成功')
            this.getList()
          }).catch(() => {
            row.isShow = !row.isShow
          }) : offShellApi(row.id).then(() => {
            this.$message.success('下架成功')
            this.getList()
          }).catch(() => {
            row.isShow = !row.isShow
          })
      }
    }
  }
</script>

<style scoped lang="scss">
  /*.timeBox{*/
  /*width: 100%;*/
  /*/deep/.el-form-item__content{*/
  /*width: 87% !important;*/
  /*}*/
  /*}*/
  .el-dropdown-link {
    cursor: pointer;
    color: #409EFF;
    font-size: 12px;
  }

  .el-icon-arrow-down {
    font-size: 12px;
  }

  .text-right {
    text-align: right;
  }

  .demo-table-expand {
    font-size: 0;
  }

  .demo-table-expand label {
    width: 90px;
    color: #99a9bf;
  }

  .demo-table-expand .el-form-item {
    margin-right: 0;
    margin-bottom: 0;
    width: 33.33%;
  }

  .selWidth {
    width: 100% !important;
  }

  .seachTiele {
    line-height: 30px;
  }

  .container {
    min-width: 821px;

    /deep/ .el-form-item {
      width: 100%;
    }

    /deep/ .el-form-item__content {
      width: 72%;
    }
  }

  .ivu-ml-8 {
    font-size: 12px;
    color: #1682e6;
  }
</style>
